<template>
  <view class="privacy">
    <mineNavbar :styleData="styleData" style="margin-bottom: 45rpx" />

    <view>
      <!-- <view class="title">{{
        (detailsList && detailsList.agreementName) || "-"
      }}</view> -->
      <view class="content">
        <!-- {{ (detailsList && detailsList.content) || "-" }} -->

        <rich-text :nodes="detailsList && detailsList.content"></rich-text>
      </view>
    </view>
  </view>
</template>

<script>
import { agreementTextAPI } from "@/api/subPage/mine";
export default {
  components: {},
  data() {
    return {
      styleData: {
        show: true,
        tabbarText: "隐私协议",
      },

      detailsList: {},
    };
  },
  computed: {},
  // 监控data中的数据变化
  watch: {},
  async onLoad({ type }) {
    if (type !== null) {
      const { data, code } = await agreementTextAPI(type);

      if (code === 200) {
        this.detailsList = data;
      }
    }
  },
  onShow() {},
  onReady() {},
  methods: {},
};
</script>
<style lang="scss" scoped>
.privacy {
  padding: 32rpx;

  .title {
    margin: 20rpx;
    margin-left: 0;
    height: 44rpx;
    font-family: PingFangSC-Medium;
    font-weight: 500;
    font-size: 28rpx;
    color: #000000e0;
    letter-spacing: -0.12rpx;
    text-align: justify;
    line-height: 44rpx;
  }

  .content {
    width: 686rpx;
  }
}
</style>
